package org.jrazdacha.bittorrent.modelling.core;


/**
 * Messages which receives and sends bittorrent peer
 * 
 * @author nep
 *
 */
public class Message {
	private final ConversationId conversationId;
	private final Object content;

	/**
	 * Constructs new message with given conversation id
	 * (points which type of message sends) without content
	 * 
	 * @param conversationId	
	 */
	public Message(ConversationId conversationId) {
		this(conversationId, null);
	} 
	
	/**
	 * Constructs new message with given conversation id
	 * (points which type of message sends) and a content specific for message
	 * 
	 * @param conversationId
	 * @param content
	 */
	public Message(ConversationId conversationId, Object content) {
		this.conversationId = conversationId;
		this.content = content;	
	}
	
	/**
	 * 
	 * @return conversation id of message
	 */
	public ConversationId getConversationId() {
		return conversationId;
	}

	/**
	 * 
	 * @return content specific for message
	 */
	public Object getContent() {
		return content;
	}	
}
